<style>
    #edui_fixedlayer{z-index: 200059999!important;}
</style>
<form style="padding:30px;" class="layui-form layui-form-pane formData">
    <div style="padding:30px" class="layui-form layui-form-pane">

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">单个标题：</label>
                <div class="layui-input-inline">
                    <input name="title"  required lay-verify="required" placeholder="标题" autocomplete="off" class="layui-input" value="">
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">批量标题：</label>
                <div class="layui-input-inline">
                    <textarea name="titles" maxlength="1000000" cols="10" rows="3" placeholder="一行一个标题" class="layui-textarea" style="resize: none"></textarea>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">后缀：</label>
                <div class="layui-input-inline">
                    <input name="keyword"  required lay-verify="required" placeholder="后缀" autocomplete="off" class="layui-input" value="">
                </div>
            </div>
        </div>

    </div>
</form>

<script>
    //渲染表单
    layui.use('form', function(){
        var form = layui.form;
        form.render();

    });

    var _editor = UE.getEditor("edit_image", {
        initialFrameWidth: 800,
        initialFrameHeight: 300,
    });


    _editor.ready(function() {
        _editor.hide();
        _editor.addListener('beforeInsertImage', function(t, arg) {
            if (arg.length > 1) {
                layer.msg("最多只能选择1张图片，请重新选择");
                return false;
            }else {
                $("#image").attr("value",arg[0].src);
                $("#img_preview").attr("src",arg[0].src);
            }
            return true;
        });
    });

    //上传dialog
    function upImage() {

        var myImage = _editor.getDialog("insertimage");
        myImage.open();
    }

</script>
<textarea id="edit_image" style="display: none;"></textarea>